<?php
$page = Yii::app()->getRequest()->getParam('WikiBook_page') ? Yii::app()->getRequest()->getParam('WikiBook_page') : 1;$this->breadcrumbs=array(
    Yii::t('site','Wiki Books')=>array('index','WikiBook_page'=>$page),
    $model->recordName,
    Yii::t('site','View'),
);

$this->menu=array(
    array('label'=>Yii::t('site','Item'),'items'=>array(
        array('label'=>Yii::t('site','Update Wiki Book'), 'url'=>array('update', 'id'=>$model->id,'WikiBook_page'=>$page)),
        array('label'=>Yii::t('site','Delete Wiki Book'), 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->id,'WikiBook_page'=>$page),'confirm'=>'Are you sure you want to delete this item?')),
        array('label'=>Yii::t('site','Show Wiki Pages'), 'url'=>array('/wikiPage/admin', 'WikiPage[wikiBookId]'=>$model->id)),
    )),
    array('label'=>Yii::t('site','All Items'),'items'=>array(
        array('label'=>Yii::t('site','Create New Wiki Book'), 'url'=>array('create','WikiBook_page'=>$page)),
        array('label'=>Yii::t('site','List Wiki Books'), 'url'=>array('index','WikiBook_page'=>$page)),
        array('label'=>Yii::t('site','Manage Wiki Books'), 'url'=>array('admin','WikiBook_page'=>$page)),
    )),
);
?>

<h1><?php echo Yii::t('site','View Wiki Book <em>{recordName}</em>',array('{recordName}'=>$model->recordName)); ?></h1>

<?php $this->widget('zii.widgets.CDetailView', array(
    'data'=>$model,
    'attributes'=>array(
        'id',
        'name',
        'description',
    ),
)); ?>
<br/>

<h2>Wiki Pages</h2>
<?php foreach($model->wikiPages as $wikiPage) : ?>
<?php $this->widget('zii.widgets.CDetailView', array(
    'data'=>$wikiPage,
    'attributes'=>array(
        array(
            'name'=>'title',
            'type'=>'raw',
            'value'=>CHtml::link($wikiPage->title,array('/wikiPage/view','id'=>$wikiPage->id))
        ),
    ),
)); ?> 
<?php endforeach; ?>
